// 路由配置
import { createRouter,createWebHashHistory } from "vue-router";
// 定义router

const routes=[
    {
        //自定义规则
        path:'/',
        component:()=>import('../views/Main.vue'),
        children:[
            {
                path:'/',
                name:'home',
                component:()=>import('@/views/home/Home.vue') 
            },
            {
                path:'/mall',
                name:'mall',
                component:()=>import('@/views/mall/Mall.vue') 
            },
            {
                path:'/user',
                name:'user',
                component:()=>import('@/views/user/User.vue') 
            }
        ]
    }
]

const router = createRouter({
    history:createWebHashHistory(),
    routes
})

export default router